<template>
  <div class="head">
    <div class="left" @click="goBlack" v-if="showBlack">
      <img src="../assets/arow-left.png" alt="">
    </div>
    <slot></slot>
    <div class="title">{{title}}</div>
  </div>
</template>
<script setup>
const props = defineProps({
  title:String,
  showBlack:Boolean
})
const goBlack = () => {
  window.history.go(-1);
}
</script>

<style lang="scss" scoped>
@import '@/assets/style/global.scss';
.head {
  height: 156px;
  position: fixed;
  top:0;
  left:0;
  right: 0;
  z-index: 29;
  display: flex;
  align-items: center;
  padding: 0 60px;
  background: #020914;
  .title {
    font-size: 42px;
    font-weight: bold;
    color:#ffffff;
    padding-left: 40px;
  }
  .left {
    height: 100%;
    width:130px;
    //background: url('@/assets/arow-left.png') no-repeat center;
    position: absolute;
    top:0;
    left: 0;
    @include center();
    img {
      width: 34px;
    }
  }
}
</style>
